package com.yike.user.dto;

import cn.afterturn.easypoi.excel.annotation.Excel;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 销售报表数据信息
 *
 * @author Sakura
 * @since 2024-11-18
 */
@Data
@Accessors(chain = true)
@ApiModel(value = "财务报表信息")
public class FinanceReportDataDTO implements Serializable {
    private static final long serialVersionUID = 1L;

    @Excel(name = "日期")
    private String countDate;

    @Excel(name = "代理商编号", width = 15)
    private String agentNo;

    @Excel(name = "代理商名称", width = 15)
    private String agentName;

    @Excel(name = "店铺名称", width = 15)
    private String shopName;

    @Excel(name = "店铺编号", width = 15)
    private String shopNo;

    @Excel(name = "应收金额", width = 15)
    private BigDecimal totalAmount = BigDecimal.ZERO;

    @Excel(name = "实收金额", width = 15)
    private BigDecimal actualAmount = BigDecimal.ZERO;

    @Excel(name = "订单量", width = 15)
    private Integer orderNumber = 0;

    @Excel(name = "微信订单数", width = 15)
    private Integer wxOrderNumber = 0;

    @Excel(name = "微信金额", width = 15)
    private BigDecimal wxAmount = BigDecimal.ZERO;

    @Excel(name = "阿里订单数", width = 15)
    private Integer aliOrderNumber = 0;

    @Excel(name = "支付宝金额", width = 15)
    private BigDecimal aliAmount = BigDecimal.ZERO;

    @Excel(name = "退款数量", width = 15)
    private Integer refundNumber = 0;

    @Excel(name = "退款金额", width = 15)
    private BigDecimal refundAmount = BigDecimal.ZERO;

    @Excel(name = "分佣金额", width = 15)
    private BigDecimal commissionAmount = BigDecimal.ZERO;

    @Excel(name = "已提现金额", width = 15)
    private BigDecimal alreadyCommissionAmount = BigDecimal.ZERO;

    @Excel(name = "未提现金额", width = 15)
    private BigDecimal withdrawableCommissionAmount = BigDecimal.ZERO;

    @Excel(name = "新增代理商", width = 15)
    private Integer addAgentNumber = 0;

    @Excel(name = "新增店铺", width = 15)
    private Integer addShopNumber = 0;

    @Excel(name = "代理商级别", width = 15)
    private String agentLevel;

    @Excel(name = "地区", width = 15)
    private String region;

    @Excel(name = "备注", width = 15)
    private String remark;

    public void setActualAmount(BigDecimal actualAmount) {
        if (actualAmount == null) {
            actualAmount = BigDecimal.ZERO;
        }
        this.actualAmount = actualAmount;
    }
}
